package com.synergy.stockflow.production.service.impl;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.synergy.stockflow.production.entity.ProductionTask;
import com.synergy.stockflow.production.mapper.ProductionTaskMapper;
import com.synergy.stockflow.production.service.ProductionTaskService;
@Service
public class ProductionTaskServiceImpl extends ServiceImpl<ProductionTaskMapper, ProductionTask> implements ProductionTaskService{

    @Override
    public List<ProductionTask> selectTaskAndWorkstation(String processId){
        return baseMapper.selectTaskAndWorkstation(processId);
    }

    @Override
    public List<ProductionTask> selectTask(){
        return baseMapper.selectTask();
    }

    @Override
    public int updateComputedQuantity(@Param("taskId") String taskId,
                                      @Param("computedQuantity") BigDecimal computedQuantity){
        return baseMapper.updateComputedQuantity(taskId,computedQuantity);
    }
}
